import service from '@/utils/request'
// @Tags Coupons
// @Summary 创建coupons表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Coupons true "创建coupons表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"创建成功"}"
// @Router /coupon/createCoupons [post]
export const createCoupons = (data) => {
  return service({
    url: '/coupon/createCoupons',
    method: 'post',
    data
  })
}

// @Tags Coupons
// @Summary 删除coupons表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Coupons true "删除coupons表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /coupon/deleteCoupons [delete]
export const deleteCoupons = (params) => {
  return service({
    url: '/coupon/deleteCoupons',
    method: 'delete',
    params
  })
}

// @Tags Coupons
// @Summary 批量删除coupons表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除coupons表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /coupon/deleteCoupons [delete]
export const deleteCouponsByIds = (params) => {
  return service({
    url: '/coupon/deleteCouponsByIds',
    method: 'delete',
    params
  })
}

// @Tags Coupons
// @Summary 更新coupons表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Coupons true "更新coupons表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /coupon/updateCoupons [put]
export const updateCoupons = (data) => {
  return service({
    url: '/coupon/updateCoupons',
    method: 'put',
    data
  })
}

// @Tags Coupons
// @Summary 用id查询coupons表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.Coupons true "用id查询coupons表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /coupon/findCoupons [get]
export const findCoupons = (params) => {
  return service({
    url: '/coupon/findCoupons',
    method: 'get',
    params
  })
}

// @Tags Coupons
// @Summary 分页获取coupons表列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取coupons表列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /coupon/getCouponsList [get]
export const getCouponsList = (params) => {
  return service({
    url: '/coupon/getCouponsList',
    method: 'get',
    params
  })
}

// @Tags Coupons
// @Summary 不需要鉴权的coupons表接口
// @accept application/json
// @Produce application/json
// @Param data query couponsReq.CouponsSearch true "分页获取coupons表列表"
// @Success 200 {object} response.Response{data=object,msg=string} "获取成功"
// @Router /coupon/getCouponsPublic [get]
export const getCouponsPublic = () => {
  return service({
    url: '/coupon/getCouponsPublic',
    method: 'get',
  })
}
